#!/bin/sh
#
# Start lvgl....
#


export $(dbus-launch)

start() {
	printf "Starting 100ask lvgl: "
	echo -e "\033[9;0]"  >  /dev/tty0   # 此行请自己手敲，直接复制可能会出错
	echo -e "\033[?25l"  > /dev/tty1    # 此行请自己手敲，直接复制可能会出错，其中 25l 是 L 的小写
	export $(dbus-launch)
	cd /usr/share/100ask_desktop/
	./100ask_lvgl_Main &
	[ $? = 0 ] && echo "OK" || echo "FAIL"
}

stop() {
	printf "Stopping lvgl: "
}

case "$1" in
    start)
	start
	;;
    stop)
	stop
	;;
    restart|reload)
	stop
	start
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?
